package com.zitangkou.user.domain;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zitangkou.common.enums.StatusEnum;

/**
 * @author Deng Ningning
 * @version 1.0
 * @date 2020/11/13 21:58
 */
public interface IUserDomainService {

    /**
     * 分页条件查询用户列表
     *
     * @param current
     * @param size
     * @param keyword
     * @param status
     * @return com.baomidou.mybatisplus.core.metadata.IPage<com.zitangkou.user.model.domain.UserDomain>
     * @date 2021/2/27 13:14
     */
    IPage<UserDomain> selectPageByConditions(Integer current, Integer size, String keyword, StatusEnum status);

    /**
     * 根据用户编号查询用户
     *
     * @param userId
     * @return com.zitangkou.user.model.domain.UserDomain
     * @date 2021/2/27 9:48
     */
    UserDomain getUserById(String userId);

    /**
     * 根据条件查询用户
     *
     * @param userDomain
     * @return com.zitangkou.user.model.domain.UserDomain
     * @date 2021/2/27 14:18
     */
    UserDomain selectOneByConditions(UserDomain userDomain);

    /**
     * 根据编号修改用户
     *
     * @param userDomain
     * @return boolean
     * @date 2021/2/27 14:04
     */
    boolean updateById(UserDomain userDomain);

    /**
     * 新增用户
     *
     * @param userDomain
     * @return boolean
     * @date 2021/2/27 14:08
     */
    boolean insertUser(UserDomain userDomain);

    /**
     * 根据条件统计数量
     *
     * @param userDomain
     * @return int
     * @date 2021/2/27 14:15
     */
    int countByConditions(UserDomain userDomain);
}
